// rgDefines.h

#ifndef _RG_DEFINES_H_
#define _RG_DEFINES_H_

#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union

#include <base/rgTypes.h>

//#define RG_DEBUG

#define RG_RELEASE

#ifndef _DEBUG
	#define ASSERT(x)
#else
	#define ASSERT(x) \
		if (! (x)) \
		{ \
			cerr << "------------------------------------------------------------ \
			\nASSERT!!! [" << #x << "] (" << __LINE__ << ", " << __FILE__ << ")\n"; \
			cerr << "------------------------------------------------------------ \n"; \
			rgChar c; cin >> c; \
			exit(-1); \
		}
#endif

#define rgError(x) \
		cerr << "------------------------------------------------------------ \
		\nERROR: '" << x << "' (" << __LINE__ << ", " << __FILE__ << ")\n"; \
		cerr << "------------------------------------------------------------ \n"; \
		rgChar c; cin >> c; \
		exit(-1);

//rgReal rgTmp;

#define rgSwap(x, y) rgTmp = x; x = y; y = rgTmp;

#define EPSILON_1	0.1
#define EPSILON_2	0.01
#define EPSILON_3	0.001
#define EPSILON_4	0.0001

#define EPSILON EPSILON_4

#ifdef INFINITY
#undef INFINITY
#endif
#define INFINITY	1.7976931348623158e+308
//DBL_MAX

#define RAY_EPSILON 1e-3

#ifdef PI
#undef  PI
#endif
#define PI			3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706

#define D_PI_180	0.017453292519943295769236907684886
#define D_180_PI	57.295779513082320876798154814105


#ifdef TRUE
#undef  TRUE
#endif
#define TRUE 1

#ifdef FALSE
#undef  FALSE
#endif
#define FALSE 0

#ifdef NULL
#undef NULL
#endif
#define NULL 0

#define rgFALSE FALSE
#define rgTRUE TRUE

#ifdef RG_WIN_32
	#include <windows.h>
#endif

#define KERNELDLL 




#endif // _RG_DEFINES_H_
